from scipy.integrate import dblquad

# 定义被积函数
def integrand(y, x):
    return x * y

# 计算二重积分
result, error = dblquad(integrand, 0, 1, lambda x: 0, lambda x: 1)
print("Double integral result:", result)